/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rafkind.raytracer;

import java.util.List;

/**
 *
 * @author drafkind
 */
public abstract class VisibleObject {
  protected Texture texture;
  protected boolean inverse;
  
  public abstract List<IntersectionPoint> getIntersectionPoints(Ray ray);

  public boolean isInside(Vector3 where) {
    boolean answer = isInsideImplementation(where);
    if (inverse) {
      answer = !answer;
    }

    return answer;
  }

  public abstract boolean isInsideImplementation(Vector3 where);

  public Texture getTexture() {
    return texture;
  }

  public void setTexture(Texture texture) {
    this.texture = texture;
  }

  public boolean getInverse() {
    return inverse;
  }

  public void setInverse(boolean i) {
    this.inverse = i;
  }

  public abstract Vector3 getNormalAt(IntersectionPoint where);
}
